#include <iostream>
#include <queue>
#include <string.h>
using namespace std;


struct step{
	int next_right,next_left,length;
	bool operator < (const step x)const{
		return length>x.length;
	}
};


int main(){
	int l,n,m;
	priority_queue<step> q;
	cin>>l>>n>>m;
	l--;
	step len[n+1];
	bool vis[n];
	
	int bef;
	bef=0;
	for(int i=0;i<n;i++){
		int now;
		cin>>now;
		len[i].next_left = i;
		len[i].next_right = i+1;
		len[i].length = now-bef;
		q.push(len[i]);
		vis[i] = true;
		bef = now;
	}
	len[n].next_left = n;
	len[n].next_right = n+1;
	len[n].length = l-bef+1;
	q.push(len[n]);
	
	
	
	for(int i=0;i<m;i++){
		step now;
		now = q.top();
		q.pop();
		if((now.next_left > 0  &&  vis[now.next_left-1] == false)  ||  (now.next_right <= n  &&  vis[now.next_right-1] == false)){
			i--;
			continue;
		}
		if(now.next_left-1 >= 0  &&  now.next_right < n){
			if(len[now.next_left-1].length <= len[now.next_right].length){
				vis[now.next_right-1] = false;
				len[now.next_left].length += len[now.next_right].length;
				len[now.next_left].next_right = len[now.next_right].next_right;
				q.push(len[now.next_left]);
			}
			else{
				vis[now.next_right-1] = false;
				len[now.next_right].length += now.length;
				len[now.next_right].next_left = now.next_left;
				q.push(len[now.next_right]);
			}
		}
		else{
			if(now.next_left-1 < 0){
				vis[now.next_right-1] = false;
				len[now.next_left].length += len[now.next_right].length;
				len[now.next_left].next_right = len[now.next_right].next_right;
				q.push(len[now.next_left]);
			}
			else{
				vis[now.next_left-1] = false;
				len[now.next_left-1].length += now.length;
				len[now.next_left-1].next_right = now.next_right;
				q.push(len[now.next_left-1]);
			}
		}
	}
	
	
	
	for(int i=0;i<n;i++)
		cout<<vis[i]<<" ";
	cout<<endl;
	int ans=0x7fffffff;
	cout<<len[1].next_right<<endl;
	if(vis[len[0].next_right-1] == true)
		ans = len[0].length;
	for(int i=0;i<n-1;i++){
		if(vis[i] == false  ||  vis[i+1] == false)
			continue;
//		cout<<i<<" "<<len[i+1].length<<endl;
		ans = min(ans,len[i+1].length);
	}
	if(vis[n-1] == true)
		ans = min(ans,len[n].length);
	
	
	
	cout<<ans;
	return 0;
}


/*
case1:
25 8 4
1
2
3
4
6
10
20
23

out:
2
*/
